<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<!DOCTYPE html>

<html>
<head>
    <%--为了确保适当的绘制和触屏缩放，需要在 <head> 之中添加 viewport 元数据标签--%>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>
        <decorator:title/>
    </title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">


    <!-- Bootstrap 3.3.5 -->
    <link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="//cdn.bootcss.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet">
    <!-- Theme style -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/framework/dist/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <%--<link rel="stylesheet" href="/static/dist/css/skins/_all-skins.min.css">--%>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/framework/dist/css/skins/skin-cdb.css">

    <!-- jQuery 2.1.4 -->
    <script src="//cdn.bootcss.com/jquery/2.1.4/jquery.js"></script>

    <!-- Bootstrap 3.3.5 -->
    <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/bootstrap-table/dist/bootstrap-table.css">
    <!-- Latest compiled and minified JavaScript -->
    <script src="${pageContext.request.contextPath}/static/bootstrap-table/dist/bootstrap-table.js"></script>

    <!-- Latest compiled and minified Locales -->
    <script src="${pageContext.request.contextPath}/static/bootstrap-table/dist/locale/bootstrap-table-zh-CN.min.js"></script>

    <link href="//cdn.bootcss.com/bootstrap3-dialog/1.34.6/css/bootstrap-dialog.min.css" rel="stylesheet">
    <script src="//cdn.bootcss.com/bootstrap3-dialog/1.34.6/js/bootstrap-dialog.min.js"></script>


    <%--时间选择器--%>
    <link href="//cdn.bootcss.com/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.min.css" rel="stylesheet">
    <script src="//cdn.bootcss.com/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.min.js"></script>
    <script src="//cdn.bootcss.com/bootstrap-datepicker/1.5.0/locales/bootstrap-datepicker.zh-CN.min.js"></script>


    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/core_style.css">


    <!-- AdminLTE App -->
    <script src="${pageContext.request.contextPath}/static/framework/dist/js/app.js"></script>

    <script src="${pageContext.request.contextPath}/static/js/app_env.js"></script>

    <decorator:head/>
</head>

<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

    <header class="main-header">
        <!-- Logo -->
        <a href="/" class="logo">
            <span class="logo-lg"><b>CDB manage</b></span>
        </a>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top" role="navigation">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>

            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav"></ul>
            </div>

            <div class="navbar-right">
                <span style="color: white" id="username_label">user:</span>
                <a href="/sign/logout" title="quit" style="color: white"><i class="fa fa-sign-out"></i></a>
            </div>
        </nav>
    </header>


    <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- /.search form -->
            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu">
                <li class="header">Navigation</li>

                <li class="treeview" id="device_tree_view">

                    <a href="#">
                        <i class="fa fa-navicon"></i> <span>data view</span> <i class="fa fa-angle-left pull-right"></i>
                    </a>

                    <ul class="treeview-menu" id="data_check">
                        <li><a href="/task/index">
                            <i class="fa fa-circle-o"></i>task list</a>
                        </li>
                        <li><a href="/report/index">
                            <i class="fa fa-circle-o"></i>online list</a>
                        </li>
                        <li><a href="/single/0">
                            <i class="fa fa-circle-o"></i>single device</a>
                        </li>
                        <li><a href="/user/index">
                            <i class="fa fa-circle-o"></i>user management</a>
                        </li>
                        <li><a href="/merchant/index">
                            <i class="fa fa-circle-o"></i>merchant management</a>
                        </li>
                    </ul>

                </li>

                <%--<li class="treeview" id="manage_tree_view">--%>
                    <%--<a href="#">--%>
                        <%--<i class="fa fa-navicon"></i> <span>Authority</span> <i class="fa fa-angle-left pull-right"></i>--%>
                    <%--</a>--%>
                    <%--<ul class="treeview-menu" id="auth_manage_menu">--%>
                        <%--<li id="user_manege_page"><a href="/user_manager/page"><i class="fa fa-circle-o"></i> user--%>
                            <%--manage</a></li>--%>
                    <%--</ul>--%>
                <%--</li>--%>

                <li class="treeview" id="system_view">
                    <a href="#">
                        <i class="fa fa-navicon"></i> <span>System Param</span> <i
                            class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu" id="system_monitor_menu">
                        <li id="system_monitor_page"><a href="/system_param/page"><i class="fa fa-circle-o"></i>cpu ram
                            exist</a></li>
                    </ul>
                </li>
            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <%--将 content-header 放到 Body 中实现, 这样不同的页面就有不同的 header 了--%>
        <decorator:body/>
    </div>
    <!-- /.content-wrapper -->
    <footer class="main-footer">
        <div class="pull-right hidden-xs">
            <b>Version</b> 1.0
        </div>
        <strong> &copy; Copyright 2017 by gaoli</strong>
    </footer>
</div>
<!-- ./wrapper -->

<script>
    // 初始化日期选择器
    $(document).ready(function () {
        $.ajax({
            type: 'POST',
            url: "/sign/getusername.inner",
            contentType: 'application/json',
            dataType: "json",
            timeout: 30000,
            success: function (data) {
                var dataObj = eval(data);
                if (typeof(dataObj.username) == "undefined") {
                    $("#username_label").html("user:no user");
                } else {
                    $("#username_label").html("user:" + dataObj.username);
                }
            }
        });
    });

    $('.input-daterange').datepicker({
        language: "en-US",
        format: 'yyyy-mm-dd',
        orientation: "bottom"
    });
</script>
</body>
</html>

